package com.toe.pojo.dto.user;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;

@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="UserUserVO对象")
public class UserDTO implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "用户名(真实姓名)",required = true,position = 1)
    @NotBlank(message = "用户名不能为空!")
    private String username;

    @ApiModelProperty(value = "账号",required = true)
    private String account;

    @ApiModelProperty(value = "密码（密文）",required = true,position = 2)
    @Pattern(regexp = "^(?![0-9]+$)(?![a-z]+$)(?![A-Z]+$)(?!([^(0-9a-zA-Z)])+$).{6,20}$",message = "密码必须由6-20位数字,英文,字符中的两种以上组成!")
    private String password;

    @NotBlank(message = "昵称不能为空!")
    @ApiModelProperty(value = "昵称",position = 3)
    private String nickname;

    @ApiModelProperty(value = "头像URL",position = 4)
    private String avatar;

    @ApiModelProperty(value = "背景图片URL",position = 5)
    private String background;

    @ApiModelProperty(value = "性别",position = 6)
    private String sex;

    @ApiModelProperty(value = "出生日期",position = 7)
    @NotNull
    private Date birthday;

    @ApiModelProperty(value = "身高",required = true,position = 8)
    private Double height;


    @ApiModelProperty(value = "体重",required = true,position = 9)
    private Double weight;

    @ApiModelProperty(value = "bmi值",position = 10)
    private Double bmi;

    @ApiModelProperty(value = "手机号码",required = true,position = 11)
    @Pattern(regexp = "^1([358][0-9]|4[579]|66|7[0135678]|9[89])[0-9]{8}$",message = "请输入正确的电话号码!")
    private String phone;

    @ApiModelProperty(value = "电子邮箱",required = true,position = 12)
    @Pattern(regexp = "^\\w+([\\.-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w{2,3})+$",message = "请输入正确的电子邮箱地址!")
    private String email;

    @ApiModelProperty(value = "个人描述",position = 13)
    private String description;

    @ApiModelProperty(value = "短信验证码",position = 14)
    private String code;
}
